package com.hzvictory.hotel_system.pojo.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
//import com.hzvictory.hotel_system.common.annotation.Excel;
import com.hzvictory.hotel_system.common.core.domain.BaseEntity;

/**
 * 购物车管理对象 dishcart
 *
 * @author hzvictory
 * @date 2025-07-24
 */
public class Dishcart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 用户ID */
    //@Excel(name = "用户ID")
    private Long userId;

    /** 菜品ID */
    //@Excel(name = "菜品ID")
    private Long dishId;

    /** 数量 */
    //@Excel(name = "数量")
    private Long quantity;

    /** 添加时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    //@Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setDishId(Long dishId)
    {
        this.dishId = dishId;
    }

    public Long getDishId()
    {
        return dishId;
    }

    public void setQuantity(Long quantity)
    {
        this.quantity = quantity;
    }

    public Long getQuantity()
    {
        return quantity;
    }

    public void setAddTime(Date addTime)
    {
        this.addTime = addTime;
    }

    public Date getAddTime()
    {
        return addTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("dishId", getDishId())
                .append("quantity", getQuantity())
                .append("addTime", getAddTime())
                .toString();
    }
}
